#include <bits/stdc++.h>
using namespace std;
#define int long long
int k;
void solve()
{
    cin>>k;
    bool f=0;
    for(int i=2;i*i<=k+1;i++)
    {
        if((k+1)%i==0)
        {
            f=1;
            int a=i-1;
            int b=(k+1)/i-1;
            cout<<a+b<<" "<<a*b;
            break;
        }
    }
    if(!f)cout<<-1;
}
signed main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int T=1;
    //cin>>T;
    while(T--)
    {
       solve();
    }
    return 0;
}